import Cookies from 'js-cookie'

// token的唯一标识符
const hrKey = 'hrsaasToken'
// token时间戳的唯一标识符
const tokenStamp = 'token-time'

export function getToken() {
  return Cookies.get(hrKey)
}

export function setToken(data) {
  Cookies.set(hrKey,data)
}

export function removeToken() {
  Cookies.remove(hrKey)
}

export function setTimeStamp() {
  Cookies.set(tokenStamp,Date.now())
}

export function getTimeStamp() {
  return Cookies.get(tokenStamp)
}